const app = getApp();
var njzxw = require('../../../../utils/njzxw.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    show:false,
    typeList:[
      {
        path:'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1536689434925&di=e55ce8be0af5ea8cc5b7554c47927041&imgtype=0&src=http%3A%2F%2Fpic137.nipic.com%2Ffile%2F20170806%2F21485791_114413206001_2.jpg',
        name:'肉类',
        id:1
      },
      {
        path: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1536689434925&di=e55ce8be0af5ea8cc5b7554c47927041&imgtype=0&src=http%3A%2F%2Fpic137.nipic.com%2Ffile%2F20170806%2F21485791_114413206001_2.jpg',
        name: '肉类'
      },
      {
        path: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1536689434925&di=e55ce8be0af5ea8cc5b7554c47927041&imgtype=0&src=http%3A%2F%2Fpic137.nipic.com%2Ffile%2F20170806%2F21485791_114413206001_2.jpg',
        name: '肉类'
      },
      {
        path: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1536689434925&di=e55ce8be0af5ea8cc5b7554c47927041&imgtype=0&src=http%3A%2F%2Fpic137.nipic.com%2Ffile%2F20170806%2F21485791_114413206001_2.jpg',
        name: '肉类'
      },
      {
        path: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1536689434925&di=e55ce8be0af5ea8cc5b7554c47927041&imgtype=0&src=http%3A%2F%2Fpic137.nipic.com%2Ffile%2F20170806%2F21485791_114413206001_2.jpg',
        name: '肉类'
      },
      {
        path: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1536689434925&di=e55ce8be0af5ea8cc5b7554c47927041&imgtype=0&src=http%3A%2F%2Fpic137.nipic.com%2Ffile%2F20170806%2F21485791_114413206001_2.jpg',
        name: '肉类'
      },
      {
        path: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1536689434925&di=e55ce8be0af5ea8cc5b7554c47927041&imgtype=0&src=http%3A%2F%2Fpic137.nipic.com%2Ffile%2F20170806%2F21485791_114413206001_2.jpg',
        name: '肉类'
      },
      {
        path: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1536689434925&di=e55ce8be0af5ea8cc5b7554c47927041&imgtype=0&src=http%3A%2F%2Fpic137.nipic.com%2Ffile%2F20170806%2F21485791_114413206001_2.jpg',
        name: '肉类'
      }
    ]
  },
  bindconfirm: function (e) {
    wx.navigateTo({
      url:'/pages/gongju/ys/ys?id={{data.id}}&str=xxx'
    });
  },
  /**
   * 搜索按钮点击控制
   */
  clickSeach:function(){
    this.setData({
      show: true
    });
  },
  quxiaoSeach:function(){
    this.setData({
      show: false
    });
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    njzxw.initFun(this);
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
  
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
  
  }
})